home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
shareware
/
telecom
/
ncomm
/
script.doc
/
script.doc
Wrap
Text File
|
1994-11-17
|
18KB
|
592 lines
The NComm V1.9 scriptlanguage
=============================
A scriptfile is an ASCII textfile that consists of different commands,
separated by one or more linefeeds. Edit the scriptfiles with your
favourite editor. Only one command is allowed per line, but blank
lines are also OK. A line can consist of blanks before the command and
between parameters. Comments can be added by entering a semicolon. A
label is marked with a colon as its last character, e.g. "quit:". The
script commands are case independent, but strings within quotes are
not.
Scripts are mainly used to automate logons, or to companion you while
you are online. Scripts can also perform more advanced functions,
like grabbing mail and perhaps posting it on another board (or even
printing it!). You set the limits...
Two example scripts and one Host-Mode script have been included with
the NComm package. Take a look at them if you don't understand how to
use the commands.
Important: The filenames specified in a scriptfile are relative to
the current directory, NOT the default upload and download
directories!
Summary of Script commands
--------------------------
ASCSEND
Starts ASCII text send of the filename given. Example:
ASCSEND "df1:text/msg"
The TIMEOUT command also concerns ASCSEND. If ASCSEND is halted by a
^S and no ^Q has been received within the timelimit specified by
TIMEOUT, the script will go on with the next command. XON will be
turned on before ASCSEND.
----------------------------------------------------------------------
BEEP
Will cause an audible 'beep' of the terminal and / or will flash the
screen and / or will bring the screen to front, depending on what you
have configured in the SCREEN menu. Nothing is sent through the
serial port.
----------------------------------------------------------------------
BREAK
Sends a break to the host machine. Equivalent to SEND "\l".
----------------------------------------------------------------------
CAPTURE
Toggles ASCII capture on/off. Examples:
CAPTURE "filename"
Will open the capture file and turn on capture. It will be opened in
'append mode' if the file exists...
CAPTURE SUS
Will suspend capture. Capture can be turned on again with the command
CAPTURE ON
CAPTURE OFF
Will turn capture off and close the file. The file cannot be opened
again with the CAPTURE ON command.
----------------------------------------------------------------------
CD
Problems occur when the "CD" command is used with the CLI function.
The "CD" command has therefore been made a special function. It
simply changes the directory that is to be used for commands started
with the "CLI" function.
Example:
CD "RAM:" ;Will change the current working directory to 'RAM:'
----------------------------------------------------------------------
CHAIN
Will start a new script. The control will never return to the calling
script. This is useful when you need extremely long scripts that
won't fit in memory.
Example:
CHAIN "NComm:ReadNews.script"
----------------------------------------------------------------------
CLI
Will execute a program or a command. The output from these programs
and commands will occur in the NComm window. This command will be
relative to the directory you were standing in when you started NComm.
Please note; Current Directory can not be set with the CLI command,
probably due to problems with the Amiga operating system. The "CD"
function must therefore be used for this purpose.
Examples:
CLI "dir dh0:comms"
CLI "type ram:foo.bar"
CLI "pkax ram:grabfile.arc"
----------------------------------------------------------------------
CLRSTACK
This command clears the RETURN stack, i.e. it forgets active
subroutine calls (gosubs). The command is handy at error situations,
when you wish to "jump out" of the program and start over again, for
example in conjunction with TIMEOUT or WHEN commands.
----------------------------------------------------------------------
CONFIG
Will read a new configuration file. Example:
CONFIG "NComm:MBBS.config"
----------------------------------------------------------------------
CONVERSE
Will wait for a prompt from the host machine and answer it.
Examples:
CONVERSE "Enter your name:" "Name\n" ;Waits for 'Enter your name:'
CONVERSE "enter your password:" "\p\n" ;Sends phonebook password + CR
CONVERSE "Command:" "G\n" ;Sends 'G' and newline
----------------------------------------------------------------------
DELAY
The script program will take a break. The program will function as
normal.
Examples:
DELAY 5 ;Wait 5 seconds
DELAY UNTIL 12:00 ;Wait until 12 o'clock.
----------------------------------------------------------------------
DIAL
Will dial one or more phonenumbers. Can also dial entries in the
phonebook. If you choose to dial phonenumbers, use the command
'DIAL#'. The numbers must be placed within quotation marks. If you
choose to dial more than one number, the numbers can be separated by a
comma.
Examples:
DIAL# "454143"
DIAL# "380949", "493210", "454143"
Named entries in the phonebook can be dialled by specifying the
boardname within quotation marks. You only have to specify the number
of letters required to separate the board from the others. The
name is not case sensitive.
Examples:
DIAL "AmigaBBS"
DIAL "rode", "Mike's", "media"
DIAL "Rodeløkka (M)BBS"
----------------------------------------------------------------------
DLWHEN
Deletes the last defined WHEN command. Repeated usage will succesive
delete the "previous" WHEN command. See: WHEN.
----------------------------------------------------------------------
DOWNLOAD
Will download a file from the host machine. The protocol specified in
the TRANSFER menu will be used as long as nothing else is specified.
If you want to specify another protocol, enter a comma and a letter.
The filename is "dummy" when using Zmodem.
X == Xmodem, Y == Ymodem, B == Ymodem-B, G == Ymodem-G, Z == Zmodem.
Examples:
DOWNLOAD "df1:junk" ;Will use the default protocol
DOWNLOAD "df0:trash",X ;Will always use Xmodem
----------------------------------------------------------------------
DTENTHS
This is a much more precise delay command, but only use this command
when this accuracy is needed, since it will lock up the system. The
DTENTHS parameter is the number of tenth seconds to wait.
Examples:
DTENTHS 2 ;Wait 0.2 seconds
DTENTHS 16 ;Wait 1.6 seconds
----------------------------------------------------------------------
DUMP
Command for debugging a script. It dumps a list of all variables and
what they contain, on screen.
----------------------------------------------------------------------
DWHENS
Will disable all previously used WHEN commands. See: WHEN.
----------------------------------------------------------------------
ECHO
This command defines if characters read by the INPUT command shall be
echoed. ECHO ON should be used when input is read from a user in the
other end. ECHO OFF should be used when input is read from a Bulletin
Board System, or when the user is not supposed to see what he writes.
ECHO should be turned ON if the functions ASCSEND and MSGSEND are
supposed to echo text locally. The output from the CLI command will
be sent to the serial port if ECHO has been turned on.
----------------------------------------------------------------------
END
Will stop the execution of the script. This command is especially
useful in front of subroutines.
Example:
WHEN "Read>" GOSUB next
WAIT "No more unread."
END
Next: SEND "\n"
MESSAGE "(Skipping to next unread)\n"
RETURN
----------------------------------------------------------------------
GOSUB
Will call a named subroutine. Useful when you want to use the same
command many times within a script, or in connect